Data encoding by efficient inversion of a parity-check sub-matrix

ABSTRACT

A method for data encoding includes receiving a data vector to be encoded into a code word in accordance with a code defined by a parity-check matrix H. An intermediate vector  s  is produced by multiplying the data vector by a data sub-matrix H s  of the parity-check matrix H. A parity part of the code word is derived by applying a sequence of operations to the intermediate vector  s  based on a decomposition of a parity sub-matrix H p  of the matrix H using matrices A, C, U and V, in which decomposition A is a block triangular matrix that has the same size as H p , C is matrix that is smaller than H p , and the matrices U and V are placement matrices that are selected so that A, C, U and V satisfy a matrix equation H p =A+UCV.

TECHNICAL FIELD

Embodiments described herein relate generally to Error Correction Coding (ECC), and particularly to methods and systems for ECC encoding.

BACKGROUND

In various fields, such as data communications and data storage, the data is protected by applying Error Correction Coding (ECC). ECC typically involves calculating redundancy or parity bits that can be used for detecting and correcting corrupted data. Some types of error correction codes, such as Low-Density Parity-Check (LDPC) and Generalized LDPC (GLDPC) codes, can be defined using a respective parity-check matrix.

SUMMARY

An embodiment that is described herein provides a method for data encoding that includes receiving, via an interface of a data encoder, a data vector to be encoded into a code word in accordance with a code defined by a parity-check matrix H. An intermediate vector s is produced, by encoding circuitry of the data encoder, by multiplying the data vector by a data sub-matrix H_(s) of the parity-check matrix H. A parity part of the code word is derived, by the encoding circuitry, by applying a sequence of operations to the intermediate vector s based on a decomposition of a parity sub-matrix H_(p) of the matrix H using matrices A, C, U and V, in which decomposition A is a block triangular matrix that has the same size as H_(p), C is matrix that is smaller than H_(p), and the matrices U and V are placement matrices that are selected so that A, C, U and V satisfy a matrix equation H_(p)=A+UCV.

In some embodiments, applying the sequence of operations is equivalent to multiplying the vector s by an inverse of the parity sub-matrix, H_(p) ⁻¹. In other embodiments, applying the sequence of operations includes solving an equation of a form A·y=x using a back-substitution process. In yet other embodiments, applying the sequence of operations includes multiplying a matrix UW⁻¹V by a vector y that equals A⁻¹·s, W⁻¹ is an inverse matrix of a matrix W=(C⁻¹+V·A⁻¹·U).

In an embodiment, the matrix W⁻¹ is pre-calculated before applying the sequence of operations. In another embodiment, the matrix W is predefined, and multiplying the matrix UW⁻¹V by the vector y includes applying the sequence of operations to the vector y based on a decomposition of the matrix W using matrices A′, C′, U′ and V′, in which decomposition A′ is a block triangular matrix that has the same size as W, C′ is a matrix that is smaller than W, and the matrices U′ and V′ are placement matrices that are selected so that A′, C′, U′ and V′ satisfy a matrix equation W=A′+U′C′V′.

In some embodiments, the parity-check sub-matrix H_(p) includes multiple circulant sub-matrices structured from cyclically shifted versions of an identity matrix, and applying the sequence of operations includes applying vector cyclic shift operations in accordance with a structure of the respective circulant sub-matrices. In other embodiments, the code includes multiple component codes, the parity-check sub-matrix H_(p) includes one or more block-circulant matrices, each including multiple blocks that belong to respective component parity-check matrices of the component codes. In yet other embodiments, the parity-check sub-matrix H_(p) includes interleaved block-columns of the block-circulant matrices.

In an embodiment, receiving the data vector includes retrieving the data vector for storage in a memory device. In another embodiment, receiving the data vector includes receiving the data vector for transmission in a communication system.

There is additionally provided, in accordance with an embodiment that is described herein, a data encoder, including an interface and encoding circuitry. The interface is configured to receive a data vector to be encoded into a code word in accordance with a code defined by a parity-check matrix H. The encoding circuitry is configured to produce an intermediate vector s by multiplying the data vector by a data sub-matrix H_(s) of the parity-check matrix H, and to derive a parity part of the code word by applying a sequence of operations to the vector s based on a decomposition of a parity sub-matrix H_(p) of the matrix H using matrices A, C, U and V, in which decomposition A is a block triangular matrix that has the same size as H_(p), C is matrix that is smaller than H_(p), and the matrices U and V are placement matrices that are selected so that A, C, U and V satisfy a matrix equation H_(p)=A+UCV.

There is additionally provided, in accordance with an embodiment that is described herein, a computer software product, the product including a tangible non-transitory computer-readable medium in which program instructions are stored, which instructions, when read by a processor of a data encoder, cause the processor to receive, via an interface of the data encoder, a data vector to be encoded into a code word in accordance with a code defined by a parity-check matrix H, and, to produce an intermediate vector s by multiplying the data vector by a data sub-matrix H_(s) of the parity-check matrix H, and to derive a parity part of the code word by applying a sequence of operations to the vector s based on a decomposition of a parity sub-matrix H_(p) of the matrix H using matrices A, C, U and V, in which decomposition A is a block triangular matrix that has the same size as H_(p), C is matrix that is smaller than H_(p), and the matrices U and V are placement matrices that are selected so that A, C, U and V satisfy a matrix equation H_(p)=A+UCV.

These and other embodiments will be more fully understood from the following detailed description of the embodiments thereof, taken together with the drawings in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram that schematically illustrates a wireless communication system that uses error correction coding, in accordance with an embodiment that is described herein;

FIG. 2 is a block diagram that schematically illustrates a data storage system that uses error correction coding, in accordance with an alternative embodiment that is described herein;

FIG. 3 is a diagram that schematically illustrates a parity-check matrix that is decomposed into suitable sub-matrices for the purpose of error correction coding (ECC) encoding, in accordance with an embodiment that is described herein; and

FIG. 4 is a flow chart that schematically illustrates a method for ECC encoding based on efficient matrix inversion, in accordance with an embodiment that is described herein.

DETAILED DESCRIPTION OF EMBODIMENTS Overview

In various applications, certain data needs to be protected using Error Correction Coding (ECC). An ECC encoder typically processes the data to generate respective code words in accordance with a given code, wherein each code word includes one or more redundancy or parity bits. Depending on the application, the code words may get corrupted for various reasons. In decoding a code word, the parity bits can be used for recovering the uncorrupted data.

Some types of error correction codes, such as, for example, Low-Density Parity-Check (LDPC) and Generalized LDPC (GLDPC) codes, can be defined using a respective parity-check matrix. Embodiments that are disclosed herein provide improved methods and systems for data encoding by efficient inversion of a sub-matrix of the parity-check matrix.

In the description that follows and in the claims matrices are denoted by capital letters, possibly including a subscript letter, and vectors are denoted by a letter having an underline or an over-line. Underline and over-line notation is used interchangeably. For example, a vector s may also be referred to as s.

In some embodiments, the encoding process is based on decomposition of the parity-check matrix H into a data sub-matrix H_(s) and a parity sub-matrix H_(p) so that H=[H_(s)|H_(p)]. Given an input vector d, the encoder can, in principle, calculate the parity bits p by multiplying an intermediate vector s=H_(s)·d by the inverse matrix H_(p) ⁻¹.

Such an encoding scheme requires holding H_(p) in memory (e.g., in certain codes such as LDPC, H_(p) can be stored efficiently) and calculating H_(p) ⁻¹ in real time. Alternatively, the encoder can hold a pre-calculated inverse matrix in memory. In typical real-life application, however, H_(p) is very large (e.g., on the order of several hundreds of bits per dimension), and therefore cannot be inverted in real time. Additionally, H_(p) ⁻¹ is typically dense, and holding H_(p) ⁻¹ in memory requires a large storage space. Moreover, multiplying s by a large matrix H_(p) ⁻¹ requires intensive processing. In the disclosed techniques, H_(p) is decomposed in a way that results in efficient encoding, both in terms of storage space and complexity.

In some embodiments, H_(p) can be decomposed as H_(p)=A+UCV, wherein A is a block lower triangular matrix of the same size as H_(p), and C is a matrix that is smaller than H_(p). U and V are placement matrices that scatter elements of C within the area of H_(p) so as to satisfy the matrix equation H_(p)=A+UCV. Using this decomposition, efficient encoding is achieved based on the Woodbury matrix identity that defines the inverse of (A+UCV) in terms of the inverse matrices A⁻¹ and C⁻¹.

In some embodiments, the parity part of the code word is derived by solving a matrix equation of the form Ay=x. Since by the above decomposition, A is a block triangular matrix, y can be derived efficiently using a back-substitution process. In addition, deriving the parity part comprises a matrix by vector multiplication operation in which the matrix has the same size as the matrix C of the decomposition. With proper design, the matrix C is much smaller than H_(p), which results in significant reduction in storage space and complexity.

In some of the disclosed embodiments, the underlying code comprises a Quasi-Cyclic LDPC (QC-LDPC) code, and the respective H_(p) matrix comprises circulant sub-matrices that are derived from cyclically shifted versions of the identity matrix. In such embodiments, implementing the back-substitution process and the matrix multiplication operation can be further optimized using cyclic shift operations in accordance with the structure of the circulant sub-matrices.

In some embodiments, the underlying code comprises a GLDPC code that comprises multiple component codes. The GLDPC encoder generates a composite code word that comprises multiple respective component code words of the component codes. In an embodiment, the parity-check sub-matrix H_(p) of the GLDPC code is constructed from one or more block-circulant matrices, each of which comprises multiple blocks that belong to respective parity-check matrices of the component codes. Hp can be constructed, for example, by interleaving block-columns of multiple such block-circulant matrices. This matrix construction results in a matrix H_(p) that can be decomposed as Hp=A+UCV, as described above, for efficient encoding.

SYSTEM DESCRIPTION

FIG. 1 is a block diagram that schematically illustrates a wireless communication system 20 that uses error correction coding, in accordance with an embodiment that is described herein. System 20 comprises a transmitter 24, which transmits data to a receiver 28. The transmitter accepts input data, encodes the data with a certain ECC encoder 30 (the encoded data is also referred to as a code word), modulates the encoded data, using a modulator 34, in accordance with a certain modulation scheme, converts the modulated digital signal to an analog signal, up-converts the analog signal to a suitable Radio frequency (RF) using an RF unit 38 and transmits the RF signal toward the receiver using a transmitting antenna 42. A processor 46 is configured to control the operation of ECC encoder 30. The structure and functionality of encoder 30 will be described in detail below.

In receiver 28 (whose internal elements are not shown), a receiving antenna 50 receives the RF signal and provides it to a RF front end, which down-converts the RF signal to baseband or to a suitable Intermediate Frequency (IF), and digitizes the signal using a suitable Analog to Digital Converter (ADC). The digitized signal carrying the ECC-encoded data (i.e., the received code word possibly containing one or more errors) is demodulated by a modem, and the ECC is decoded by an ECC decoder. By decoding the ECC, the decoder at the receiver reconstructs the data that was input to transmitter 24. The reconstructed data is provided as the receiver output.

System 20 may comprise, for example, a cellular system, a satellite system, a point-to-point communication link, or any other suitable communication system that employs ECC. Although the example of FIG. 1 refers to a wireless communication system, the techniques described herein can be used with wire-line communication systems, such as cable communication systems or optical communication systems, as well.

FIG. 2 is a block diagram that schematically illustrates a data storage system 60 that uses error correction coding, in accordance with an alternative embodiment that is described herein. System 60 comprises a memory controller 64, which stores data in a memory device 68. The memory device comprises an array 72 comprising multiple memory cells 76. Array 72 may comprise any suitable type of volatile or non-volatile memory, such as, for example, Random Access Memory (RAM) or Flash memory. Alternatively, device 68 may comprise a magnetic storage device such as a Hard Disk Drive (HDD), or any other suitable storage medium. System 60 can be used in various host systems and devices, such as in computing devices, cellular phones or other communication terminals, removable memory modules, Solid State Disks (SSD), digital cameras, music and other media players and/or any other system or device in which data is stored and retrieved.

Memory device 68 comprises a Read/Write (R/W) unit 80, which writes data values into memory cells 76 and reads data values from the memory cells. Memory controller 64 comprises an ECC unit 84, which encodes the data for storage in accordance with a certain ECC, and decodes the ECC of data that is retrieved from the memory cells. Unit 84 is controlled by a processor 88. The structure and functionality of the encoding part of unit 84 are described in detail below. The ECC used in systems and 60 may comprise, for example, a Low-Density Parity-Check (LDPC) code, a Generalized Low-Density Parity-Check (GLDPC) code, as well as various other types of ECC.

The ECC encoding schemes described herein can be used in communication systems such as system 20, as well as in data storage systems such as system 60. The description that follows applies to both communication applications and to storage applications, and refers generally to an ECC encoder. Any reference to the ECC encoder applies to encoder 30 of system 20, as well as to the encoder functionality of unit 84 in system 60. Alternatively, the methods described herein can be carried out by any other suitable element in any other suitable system that involves ECC encoding.

ECC encoder 30 of FIG. 1 and ECC unit 84 of FIG. 2 may be implemented in software, in hardware, or using a combination of hardware and software elements. In some embodiments, ECC encoder 30 and/or unit 84 comprises a general-purpose processor, which is programmed in software to carry out the functions described herein. The software may be downloaded to the processor in electronic form, over a network, for example, or it may, alternatively or additionally, be provided and/or stored on non-transitory tangible media, such as magnetic, optical, or electronic memory.

In some embodiments, ECC encoder 30 and/or unit 84 are implemented in hardware, such as using one or more Application-Specific Integrated Circuits (ASICs), Field-Programmable gate Arrays (FPGAs) and/or discrete components.

Each of ECC encoder 30 and unit 84 comprises an input/output interface (not shown in the figures) for receiving and outputting data and other information. In the context of the description that follows and in the claims, all the elements of ECC encoder 30 and/or unit 84 that are not part of the input/output interface of the encoder are collectively referred to as encoding circuitry.

FIG. 3 is a diagram that schematically illustrates a parity-check matrix that is decomposed into suitable sub-matrices for the purpose of error correction coding (ECC) encoding, in accordance with an embodiment that is described herein. The parity-check matrix H in FIG. 3 comprises multiple blocks or sub-matrices. A parity-check matrix of such a structure can be used for defining certain ECC codes such as, for example, various types of LDPC and GLDPC codes.

In FIG. 3, the parity-check matrix H corresponds to a (n, k) code that encodes a k-bit input into a respective n-bit code word, i.e., the code word comprises (n-k) redundancy or parity bits. Although in the description that follows we mainly refer to ECC codes that are based on binary arithmetic in which variables are represented as binary elements or bits, the disclosed embodiments are also applicable to ECC codes that are defined over a non-binary field such as a Galois Field (GF).

In the example of FIG. 3, the parity-check matrix H comprises a (n−k)-by-k data sub-matrix H_(s) and a (n−k)-by-(n−k) parity sub-matrix H_(p) so that H=[H_(s)|H_(p)]. A given code word Cw can be similarly decomposed as Cw=[d|p], wherein d and p correspond to k data bits and n-k parity bits, respectively. Since a valid code word satisfies H·Cw=0, the following equation holds:

H _(s) ·d+H _(p) ·p= 0  Equation 1:

or equivalently:

p=−H _(p) ⁻¹ ·s   Equation 2:

wherein,

s=H _(s·d)   Equation 3:

In the embodiments disclosed herein, the ECC encoder first applies Equation 3 to an input vector d to produce an intermediate vector s, and then the ECC encoder uses s in Equation 2 to derive the parity bits p.

As seen in Equation 2, deriving the parity bits involves multiplying the vector s by the inverse matrix H_(p) ⁻¹. Calculating the inverse matrix of H_(p) in real time is typically impractical since the complexity of calculating the inverse matrix of an n-by-n matrix is on the order of O(n³), and in typical applications H_(p) can have several hundreds of bits or more per dimension. Alternatively, the encoder can store H_(p) ⁻¹ in memory and perform the matrix by vector multiplication of Equation 2 in real time. The storage requirements for H_(p) ⁻¹, however, are typically heavy, even when H_(p) itself can be represents in a compact form for storage. Moreover, the multiplication by H_(p) ⁻¹ in Equation 2 is a complex operation that requires intensive processing.

As will be described in detail below, in the disclosed embodiments the parity-check matrix is designed so that H_(p) can be decomposed into suitable sub-matrices, resulting in efficient encoding and a reduced storage space. In FIG. 3, H_(p) is decomposed as follows:

H _(p) =A+UCV  Equation 4:

wherein A comprises a full rank block lower triangular matrix of the same size as H_(p), and C comprises a full rank matrix whose size is smaller than the size of H_(p). U and V are placement matrices that scatter elements of C within the area of H_(p) so as to satisfy Equation 4. In the disclosed embodiments, when H_(p) is decomposed in accordance with Equation 4, the inverse matrix H_(p) ⁻¹ can be represented using the Woodbury matrix identity as follows:

H _(p) ⁻¹=(A+UCV)⁻¹ =A ⁻¹ −A ⁻¹ U(C ⁻¹ +VA ⁻¹ U)⁻¹ VA ⁻¹  Equation 5:

Using Equation 5, Equation 2 can be rewritten as:

p=[A ⁻¹ −A ⁻¹ U(C ⁻¹ +VA ⁻¹ U)⁻¹ VA ⁻¹ ]s   Equation 6:

or after left multiplication by the matrix A as:

Ap=s−U(C ⁻¹ +VA ⁻¹ U)⁻¹ VA ⁻¹ s   Equation 7:

As will be described below, when H is designed properly, instead of direct multiplication of s by H_(p) ⁻¹ as in given Equation 2, P can derived efficiently by solving Equation 7, which reduces both the storage requirements and complexity, significantly.

Efficient LDPC Encoding

Now we describe embodiments that implement efficient LDPC encoding, based on the decomposition described in Equation 4. In the present example, the LDPC code comprises a Quasi-Cyclic LDPC (QC-LDPC) code, for which the parity-check matrix H is made-up of zero sub-matrices and circulant sub-matrices of size L-by-L. Each circulant sub-matrix is derived from the L-by-L identity matrix by shifting its rows cyclically k positions to the right (0≦k≦L−1).

For a (n, k) QC-LDPC code, whose parity-check matrix H comprises m sub-matrices per column, H_(p) is a square matrix that comprises m² sub-matrices of size L-by-L each, wherein m=(n−k)/L. Note that although both H_(p) and its inverse matrix are quasi-cyclic matrices, H_(p) is a low-density matrix, whereas H_(p) ⁻¹ is generally a dense matrix. If we assume that multiplying an L-vector by an L-by-L matrix requires T clock cycles, the full multiplication of s by H_(p) ⁻¹ requires m²T clock cycles.

Table 1 below depicts a compact representation of a parity-check sub-matrix H_(p) of a QC-LDPC code. Each block in the table comprises an L-by-L zero or circulant sub-matrix. Each of the circulant sub-matrices is defined by a single number 0≦p_ij<L that corresponds to the respective cyclic shift. For example, p_ij=1 means that the sub-matrix indexed by (i,j) is derived from an L-by-L identity matrix that is shifted cyclically one position.

TABLE 1 H_(p) of a an example QC-LDPC code

A matrix Hp based on Table 1 can be decomposed in accordance with Equation 4, wherein the matrices A and C are depicted in Tables 2 and 3, respectively.

TABLE 2 Matrix A in decomposing H_(p) of Table1

TABLE 3 Matrix C in decomposing H_(p) of Table1

The placement matrices U and V should be selected so as to satisfy the matrix equation H_(p)=A+UCV of Equation 4. In the present example, U and V place the non-zero sub-matrices of C at the upper right corner of H_(p) as depicted in Table 1.

Next we describe an efficient encoding method and related variant methods that are suitable for encoding and designing QC-LDPC codes. Methods that are suitable for encoding other types of ECC codes such as, for example, GLDPC codes, are described further below.

FIG. 4 is a flow chart that schematically illustrates a method for ECC encoding, based on efficient matrix inversion, in accordance with an embodiment that is described herein. The method can be implemented, for example, within ECC encoder 30 of FIG. 1 or within ECC unit 84 of FIG. 2.

The method begins with the ECC encoder receiving an input vector d to be encoded in accordance with an ECC code defined by a respective parity-check matrix H, at a reception step 100. In the present example, the ECC code comprises a QC-LDPC code for which H comprises zero and circulant L-by-L sub-matrices.

The matrix H comprises a data sub-matrix H_(s) and a parity sub-matrix H_(p). The matrix H_(p) is square and comprises m² sub-matrices. We assume that H_(p) can be represented as H_(p)=A+UCV in accordance with Equation 4, for some matrices A, C, U and V, wherein A and C are full rank, A is a block lower triangular matrix that has the same size as H_(p), and C is smaller than H_(p). U and V are suitable placement matrices as described above. Example such decomposition is depicted in Tables 1-3 above.

At an intermediate calculation step 104, given the vector d, the ECC encoder calculates an intermediate vector s in accordance with Equation 3. Next, the ECC encoder solves Equation 7 by performing several steps as described herein.

At a first back-substitution step 108, the ECC encoder calculates a vector y=A⁻¹ s by solving a respective matrix equation:

Ay=s   Equation 8:

In an embodiment, since A is a block lower triangular matrix, y in Equation 8 can be solved using back-substitution, which is significantly more efficient than multiplying s by A⁻¹. Equation 8 can be represented as a set of m equations:

$\begin{matrix} {{{Y\; 1} = {A_{11}^{- 1}S\; 1}}{{Y\; 2} = {A_{22}^{- 1}\left( {{S\; 2} - {A_{21}Y\; 1}} \right)}}{{Y\; 3} = {A_{33}^{- 1}\left( {{S\; 3} - {A_{31}Y\; 1} - {A_{32}Y\; 2}} \right)}}\ldots {Ym} = {A_{m\; m}^{- 1}\left( {{Sm} - {\sum\limits_{l = 1}^{m - 1}{A_{m\; l}Y_{l}}}} \right)}} & {{Equation}\mspace{14mu} 9} \end{matrix}$

wherein each of the Si and Yi variables comprises a sub-vector of length L, and A_(ij) is an L-by-L matrix positioned at block-row i and block-column j of A.

At a vector modification step 112, the ECC encoder calculates a modified vector s′ of s by calculating:

s′=s−UW ⁻¹ V·y  Equation 10:

wherein,

W ⁻¹=(C ⁻¹ +VA ⁻¹ U)⁻¹  Equation 11:

In Equations 10 and 11, W⁻¹ is a matrix of the same size as C. In an embodiment, the inverse matrix W⁻¹ is pre-calculated offline and stored. Note that a proper code design that results in a small sized matrix C is advantageous in terms of both storage space and complexity. Thus, a small sized matrix C corresponds to a respective small sized matrix W⁻¹, and therefore requires less storage space than required for storing A⁻¹ for a direct calculation of y=A⁻¹ s. In addition, the complexity of multiplying y by UW⁻¹V in Equation 11 relates to the size (e.g., number of sub-matrices) of C.

Each of the sub-matrices of W⁻¹ in Equation 11 comprises a circulant matrix, or a sum of multiple circulant matrices of different cyclic shift values. As a result, the multiplication by W⁻¹ in Equation 10 can be carried out efficiently, on a block basis, using a cyclic shifter module.

At a parity calculation step 116, the ECC encoder calculates the parity p=A⁻¹ s′ by solving:

Ap=s′  Equation 12:

Similarly to Equation 8, in an embodiment, the ECC encoder solves Equation 12 using back-substitution.

At a code word derivation step 120, the ECC encoder combines the input vector d and the computed parity p to produce the full code word. The ECC encoder outputs the code word, for example, to an upper level application, and the method then terminates.

In some embodiments, when the L-by-L sub-matrices of the block lower triangular matrix A comprise circulant matrices of a QC-LDPC code, the multiplication by A_(ii) ⁻¹ in Equation 9 is equivalent to performing a vector cyclic shifting, which can be implemented efficiently using a shifter module. Assuming that processing each circulant matrix in this manner takes a single clock cycle, the full back-substitution process in each of Equations 8 and 12 takes m(m+1)/2 clock cycles.

Let m′L-by-m′L denote the dimensions of matrix C (i.e., m′<m). As noted above, since A and C are low-density quasi-cyclic matrices, W⁻¹ in Equation 11 is generally a dense quasi-cyclic matrix, and the multiplication by W⁻¹ in Equation 10 therefore takes m′²T clock cycles. The overall processing of solving Equation 7 takes m(m+1)+m′²T clock cycles. In the decomposition example of Tables 1-3, m=5 and m′=3. Assuming T=8 clock cycles per circulant matrix, the complexity of the method of FIG. 4 (i.e., solving Equation 7), measured in processing clock cycles, is 102 clock cycles, compared to m²T=200 clock cycles that would have been required by using a direct calculation.

The multiplication by W⁻¹ in Equation 10 can be further optimized when the matrix W can be decomposed (similarly to Equation 4) as:

W=A′+U′C′V′  Equation 13:

wherein A′ is a full rank block lower triangular matrix of the same size as W and C′ is a full rank matrix smaller than W. Such optimization can be viewed as nested application of the Woodbury matrix identity. In this case, the multiplication of y by W⁻¹ in Equation 11 can be carried out using steps similar to steps 108, 112 and 116 of the method of FIG. 4. The calculation in this case involves applying two back-substitution procedures corresponding to matrix A′, and one matrix multiplication operation with a matrix of the same dimensions as C′.

By careful design of the circulant matrices in H_(p), the dimensions of C′ in Equation 13 can be reduced to further lower the complexity and storage demands. Assume, for example, that each L-by-L sub-matrix of C⁻¹ comprises a sum of one or more circulant sub-matrices derived from the identity matrix at different cyclic shift values.

Table 4 below depicts the number of such summed circulant sub-matrices corresponding, for example, to the inverse matrix C⁻¹ of the matrix C of Table 3 above.

TABLE 4 The number of summed circulant matrices per sub-matrix of C⁻¹

Similarly, the numbers of summed circulant matrices in each sub-matrix of A⁻¹ in this example are depicted in Table 5:

TABLE 5 The number of summed circulant matrices per sub- matrix of A⁻¹

In this example, summing C⁻¹ and VA⁻¹U (as in Equation 11), which is the 3×3 lower left corner of A⁻¹ causes the underlined circulant sub-matrices to cancel out:

TABLE 6 The number of summed circulant matrices in the sub-matrices of G = (C⁻¹ + VA⁻¹ U)

As a result, C′ in this example comprises a single L-by-L circulant matrix, positioned at the upper right corner of G, instead of a 2×2 C′ matrix that would have been required without this optimization, thus further reducing the matrix multiplication complexity and the required storage space.

In some embodiments, the shift values in the circulant sub-matrices of H_(p) are selected with cyclic shift values up to a given maximal shift p_(max). In such embodiments, H_(p) can be reorganized by permuting, at design time, the columns and rows as follows. Select the first column of each block-column for the first m columns. Similarly, select the second column of each block-column for the second m columns. Repeat this column ordering for all the block-columns of H_(p). Apply a similar permutation procedure for the rows of H_(p).

The permutation procedure results in a matrix H_(p)′ that comprises m-by-m sub-blocks. Moreover, H_(p)′ can be decomposed into a block upper triangular matrix A, and a square matrix C at the lower left corner, whose size does not exceed p_(max)·m per dimension. Calculating the parity part of the code word using H_(p)′ can be carried out using, for example, the method of FIG. 4. By designing the code with a small value of p_(max), the complexity and storage requirements can be controlled, accordingly.

In some embodiments, at least part of the method of FIG. 4 is implemented in hardware. For example, a back-substitution can be implemented in hardware using elements such as multiplexers, accumulators, adders and cyclic shifters. For example, in an embodiment, in implementing the back-substitution process (e.g., as described in Equation 9) in hardware, one multiplexer selects L-sub-vectors of y and another multiplexer selects L-sub-vectors of s. Multiplication of a circulant matrix by a vector is performed by a cyclic shifter module that shifts the vector cyclically in accordance with the structure of the respective circulant matrix. Intermediate results are added and stored in accumulators. In some embodiments, similar hardware architecture is used for implementing vector by matrix multiplication such as multiplying y by G⁻¹.

Efficient GLDPC Encoding

GLDPC codes typically comprise multiple sub-codes or component codes. GLDPC encoding produces composite code words that comprise multiple component code words, each encoded using one of the underlying component codes. The component code words, which are typically much shorter than the composite code word, may comprise any suitable linear codes, such as, for example, Hamming codes, Bose-Chaudhuri-Hocquenghem (BCH) codes, Reed-Solomon (RS) codes and Reed-Muller (RM) codes. A GLDPC code may comprise as few as thirty or less component codes, or as many as thousands or more component codes.

GLDPC codes are typically designed so that each of the component code words shares one or more bits with at least one other component code word. Thus, each bit of the composite code word belongs to a single component code word or shared among multiple component code words. A valid composite code word of the GLDPC code comprises valid component code words of the underlying component codes. The number of code words sharing each bit (or a group of bits) is referred to as the variable node degree, denoted “dv”.

Assume, for example, a GLDPC code whose composite code words comprise N component code words, each having P parity bits. Each of the component codes can be defined by a respective component parity-check matrix of P rows having the length of the component code word. The GLDPC code is defined by a respective composite parity-check matrix H that comprises N block-rows corresponding to the N component code words. Each of the block-rows comprises columns of the respective component parity-check matrix and zero columns so that the total number of columns equals the length of the composite code word.

In the disclosed embodiments, the composite parity-check matrix is derived from one or more block-circulant matrices, wherein each of the block-circulant matrices comprises N block-rows, corresponding to the N component code words. A block-circulant matrix can be represented as an N-by-N array of blocks, in which zero blocks are empty, and X-blocks represent parts of a component parity-check matrix.

Tables 7 and 8 below depict example block-circulant matrices that can be used for constructing a GLDPC composite parity-check matrix, in an embodiment. The example block-circulant matrices are based on five (i.e., N=5) component codes. In addition, each of the block-circulant matrices has X-blocks on the main-diagonal and on a selected secondary-diagonal.

TABLE 7 A block-circulant matrix with X-blocks on the main-diagonal and on the first secondary-diagonal

TABLE 8 A block-circulant matrix with X-blocks on the main-diagonal and on the second secondary-diagonal

In the present example, we assume that the component code words are split into multiple G-bit groups wherein G≧1. Therefore, each of the blocks in Tables 7 and 8 represents a P-by-G block, so that X-blocks that belong to the same block-row correspond to the respective component code word. Note that in Tables 7 and 8, each block-column comprises two X-blocks, which means that in this example, G-bit groups are shared among two component code words, i.e., dv=2. Alternatively, the block-circulant matrices can have other variable node degree values, such as dv=3 or dv=1. Further alternatively, different block-columns may have different respective dv values.

When the GLDPC parity-check matrix comprises a single circulant matric, each of the block-circulant matrices in Tables 7 and 8 corresponds to a component code word of dv·G bits and a composite code word of N·G bits. To construct longer GLDPC codes, component code words longer than dv·G bits can be spread over multiple such block-circulant matrices that are concatenated horizontally. A GLDPC parity-check matrix that is constructed in this manner comprises the concatenated block-circulant matrices.

In some embodiments, encoding of a GLDPC code represented by a respective GLDPC composite parity-check matrix H is based on three main steps: 1) decomposing H into data and parity sub-matrices H=[H_(s)|H_(p)], 2) calculating an intermediate vector s=H_(s)·d as given in Equation 3, and 3) calculating the parity vector p=H_(p) ⁻¹ s as given in Equation 2.

For a composite code word that comprises N component code words with P parity bits per component code, the size of H_(p) is NP-by-NP. In real-life applications, N is on the order of a hundred component code words, each comprising several tens of parity bits. Calculating the inverse of such a large H_(p) matrix in real time is typically impractical. Additionally, storing H_(p) ⁻¹ that has such dimensions in memory requires large storage space.

The GLDPC parity-check sub-matrix H_(p) may comprise one or more block-circulant matrices. For example, in one embodiment G=1 (i.e., a single bit per group) and H_(p) comprises P block-circulant matrices. In another embodiment, G>1, and to satisfy the constrain NP=NG that forces Hp to be a square matrix, Hp may comprise a single block-circulant matrix in which G=P. In this embodiment, G is relatively large, which may result in large probability of trapping sets in the decoder, which is undesirable. As will be described below, in some embodiments, Hp is constructed by combining multiple matrices that each comprises a full block-circulant matrix of G=P bit-columns, or a partial block-circulant matrix that comprises only 1<G<P of the entire P bit-columns.

Now we describe a method for designing Hp by interleaving multiple block-circulant matrices. When G is constant across the block-circulant matrices, the design method can be used for reducing G by a factor that equals the number of interleaved block-circulant matrices. Consider a set of multiple block-circulant matrices that are indexed in a given order. The interleaving procedure orders the block-columns by selecting the first block-column from each block-circulant matrix according to the given order, then selecting the second block-column from each block-circulant matrix according to the same order, and so on.

For example, interleaving the block-circulant matrices of Tables 7 and 8 results in a matrix as depicted in Table 9, below. The blocks of the interleaved matrix are P bits high and G=P/2 bits wide, and are classified as XA-blocks and XC-blocks for the sake of matrix decomposition, as will be described herein. Note that in the present example, all of the XC-blocks appear only within the two most upper block-rows. More generally, the XC-blocks appear within a number of upper block-rows whose number depends on the structure of the actual block-circulant matrices chosen, and this number is bounded from below by the number of the unique block-circulant matrices.

TABLE 9 Interleaved matrix of the two block-circulant matrices of Tables 7 and 8

Next we show that H_(p) can be presented as a combination of properly selected A and C matrices. The left XC-block of the second block-row can be re-positioned at the seventh block-column of the same block-row, and the result matrix is depicted in Table 10 below.

TABLE 10 Permuted version of the matrix in Table 9

By considering the matrix in Table 10 as comprising joint blocks made from pairs of horizontal neighboring blocks, the matrix can be decomposed into a block lower triangular matrix A that comprises the XA blocks, and a matrix C at the upper right corner comprising the XC blocks. Moreover, the matrix of Table 9 that represents H_(p), can be represented as H_(p)=A+UCV (similarly to Equation 4) with suitably selected placement matrices U and V. Note that in alternative embodiments, other decomposition schemes of H_(p) can also be used.

Using the above described design method, the GLDPC encoder can be implemented similarly to the QC-LDPC encoder described above. For example, since in Table 10, the matrix A comprises a block lower triangular matrix, solving y=A⁻¹ s can be carried out using back-substitution. In addition, the size of the matrix C in Table 10 is 2P-by-2P, which is much smaller than the size NP-by-NP of the original matrix and therefore results in reduced complexity and storage space.

The size of the matrix C depends on the structure of the underlying block-circulant matrices. In the present example, the block-circulant matrices of Tables 7 and 8 have one and two wrapped-around columns, respectively, and since 2=max(1,2), two component codes are forced to participate in C, and therefore the matrix C has the size 2P-by-2P.

Using the above described design method, GLDPC encoding can be carried out using an efficient method similar to the method of FIG. 4. In this case, the back-substitution procedure that is applied at steps 108 and 116 changes, however, since the A_(ij) sub-matrices in the GLDPC case are not circulant and therefore inverting in the equations system in Equation 9 cannot be implemented using a cyclic shifter module. Each of the A_(ij) sub-matrices comprises several XA blocks to obtain a P-by-P matrix. Instead of applying online matrix inversion to calculate A_(ii) ⁻¹, in some embodiments, A_(ii) ⁻¹ are pre-calculated and stored, and are applied using matrix multiplication. This scheme is still very efficient (in complexity and storage space), since the size of A_(ii) is only P-by-P bits. In alternative embodiments, the inverse matrices A_(ii) ⁻¹ are computed online at O(N*P³) complexity, which is significantly lower than the complexity O(N³·P³) that would be required in inverting H_(p) online. Moreover, the size of the matrix C, or equivalently the size of W⁻¹ at step 112 (Equation 11) is typically much smaller than P·N (as explained above, the size of C depends on the structure of the underlying block-circulant matrices), and therefore is very efficient in terms of complexity and storage space.

Example GLDPC Encoder with BCH Component Codes

In this section we describe a design procedure of a GLDPC code having 8 Kbyte code words and a code rate equal to 0.94. The underlying component codes comprise BCH(978, 1008) codes with error correction capability T=3 (i.e., each component code can correct up to three errors). Each of the BCH component code words has P=30 parity bits. The number of BCH code words in this case is N=139, resulting in a total of N·P=139·30=4170 parity bits. The GLDPC code design in this example is based on four block-circulant matrices and dv=2 as defined in Table 11:

TABLE 11 Block-circulant matrices parameters Index of the Bits per block- secondary diagonal column (G bits) 2 6 3 8 4 8 5 8

In the present example, partial block-columns (i.e., 6 out of the 8 bit-columns) of the first block-circulant matrix are assigned to parity bits so that H_(p) is square. This partitioning scheme is equivalent to breaking down the G=8 block-circulant matrix into two sub-matrices having G1=6 & G2=2 bit-columns, assigning the G1 part for encoding (i.e., parity), and the G2 part to the data part of the code word.

Each block-circulant matrix comprises 139 block-rows of 30 bits in height. Since the numbers of bits per block-column add up to 30 bits, the total number of parity bits equals 139·30=1470 as required. Note that in the present example, the group size G is not constant and gets two possible values, i.e., 8 bits or 6 bits.

Interleaving the four block-circulant matrices, results in a square matrix that comprises 1470 bits per dimension. The upper-left and upper-right corners of this interleaved matrix are depicted in Tables 12 and 13, respectively. In these tables, X1 . . . X6 and Xa . . . Xj are the blocks of which the matrix C is comprised, after applying proper U and V placement matrices.

TABLE 12 Upper-left corner

TABLE 13 Upper-right corner

TABLE 14 Upper right corner prior to applying suitable placement matrices U and V.

In this example, the size of the matrix W⁻¹ that is pre-calculated and stored is (4·30)² bits. Direct computation of Equation 2, on the other hand, requires a storage space of (139·30)² bits. The storage space improvement ratio in this example is therefore ( 4/139)² or about 0.083%.

The methods for encoding and code design described above are given by way of example and in alternative embodiments other encoding and code design methods can also be used. For example, although the description above refers mainly to QC-LDPC and GLDPC code, the disclosed embodiments are applicable to other types of codes such as, for example, LDPC. In general, the disclosed techniques are applicable to any systematic code that can be represented by a parity-check matrix.

As another example, although in the embodiments described above the decomposition of H_(p) refers mainly to a matrix A that is a block lower triangular matrix, block upper triangular matrix and patterns derived by flipping these matrices can also be used. The disclosed techniques are additionally applicable to cases in which H_(p) can be decomposed as Hp=A+UCV, wherein A is any matrix for which the complexity of solving a matrix equation of the form Ay=s (solving for y) is lower than online inversion of H_(p)−O(n³), and/or A requires a smaller storage space than H_(p), and storing W⁻¹ wherein W=(C⁻¹+V·A⁻¹·U) also requires a storage space that is smaller than the space required for storing the full H_(p) matrix.

It will be appreciated that the embodiments described above are cited by way of example, and that the following claims are not limited to what has been particularly shown and described hereinabove. Rather, the scope includes both combinations and sub-combinations of the various features described hereinabove, as well as variations and modifications thereof which would occur to persons skilled in the art upon reading the foregoing description and which are not disclosed in the prior art. Documents incorporated by reference in the present patent application are to be considered an integral part of the application except that to the extent any terms are defined in these incorporated documents in a manner that conflicts with the definitions made explicitly or implicitly in the present specification, only the definitions in the present specification should be considered. 

1. A method for data encoding, comprising: receiving, via an interface of a data encoder, a data vector to be encoded into a code word in accordance with a code defined by a parity-check matrix H; producing, by encoding circuitry of the data encoder, an intermediate vector s by multiplying the data vector by a data sub-matrix H_(s) of the parity-check matrix H; and deriving, by the encoding circuitry, a parity part of the code word by applying a sequence of operations to the intermediate vector s based on a decomposition of a parity sub-matrix H_(p) of the matrix H using matrices A, C, U and V, wherein A is a block triangular matrix that has the same size as H_(p), C is matrix that is smaller than H_(p), and the matrices U and V are placement matrices that are selected so that A, C, U and V satisfy a matrix equation H_(p)=A+UCV.
 2. The method according to claim 1, wherein applying the sequence of operations is equivalent to multiplying the vector s by an inverse of the parity sub-matrix, H_(p) ⁻¹.
 3. The method according to claim 1, wherein applying the sequence of operations comprises solving an equation of a form A·y=x using a back-substitution process.
 4. The method according to claim 1, wherein applying the sequence of operations comprises multiplying a matrix UW⁻¹V by a vector y that equals A⁻¹·S, wherein W⁻¹ is an inverse matrix of a matrix W=(C⁻¹+V·A⁻¹·U).
 5. The method according to claim 4, wherein the matrix W⁻¹ is pre-calculated before applying the sequence of operations.
 6. The method according to claim 4, wherein the matrix W is predefined, and wherein multiplying the matrix UW⁻¹V by the vector y comprises applying the sequence of operations to the vector y based on a decomposition of the matrix W using matrices A′, C′, U′ and V′, wherein A′ is a block triangular matrix that has the same size as W, C′ is a matrix that is smaller than W, and the matrices U′ and V′ are placement matrices that are selected so that A′, C′, U′ and V′ satisfy a matrix equation W=A′+U′C′V′.
 7. The method according to claim 1, wherein the parity-check sub-matrix H_(p) comprises multiple circulant sub-matrices structured from cyclically shifted versions of an identity matrix, and wherein applying the sequence of operations comprises applying vector cyclic shift operations in accordance with a structure of the respective circulant sub-matrices.
 8. The method according to claim 1, wherein the code comprises multiple component codes, wherein the parity-check sub-matrix H_(p) comprises one or more block-circulant matrices, each comprising multiple blocks that belong to respective component parity-check matrices of the component codes.
 9. The method according to claim 8, wherein the parity-check sub-matrix H_(p) comprises interleaved block-columns of the block-circulant matrices.
 10. The method according to claim 1, wherein receiving the data vector comprises retrieving the data vector for storage in a memory device.
 11. The method according to claim 1, wherein receiving the data vector comprises receiving the data vector for transmission in a communication system.
 12. A data encoder, comprising: an interface, which is configured to receive a data vector to be encoded into a code word in accordance with a code defined by a parity-check matrix H; and encoding circuitry, which is configured to produce an intermediate vector s by multiplying the data vector by a data sub-matrix H_(s) of the parity-check matrix H, and to derive a parity part of the code word by applying a sequence of operations to the vector s based on a decomposition of a parity sub-matrix H_(p) of the matrix H using matrices A, C, U and V, wherein A is a block triangular matrix that has the same size as H_(p), C is matrix that is smaller than H_(p), and the matrices U and V are placement matrices that are selected so that A, C, U and V satisfy a matrix equation H_(p)=A+UCV.
 13. The data encoder according to claim 12, wherein the encoding circuitry is configured to apply the sequence of operations to generate a result that is equivalent to multiplying the vector s by an inverse of the parity sub-matrix, H_(p) ⁻¹.
 14. The data encoder according to claim 12, wherein the encoding circuitry is configured to solve an equation of a form A·y=x using a back-substitution process.
 15. The data encoder according to claim 12, wherein the encoding circuitry is configured to multiply a matrix UW⁻¹V by a vector y that equals A⁻¹·s, wherein W⁻¹ is an inverse matrix of a matrix W=(C⁻¹+V·A⁻¹·U).
 16. The data encoder according to claim 15, wherein the matrix W⁻¹ is pre-calculated before applying the sequence of operations.
 17. The data encoder according to claim 12, wherein the parity sub-matrix H_(p) comprises multiple circulant sub-matrices structured from cyclically shifted versions of an identity matrix, and wherein the encoding circuitry is configured to apply vector cyclic shift operations in accordance with a structure of the respective circulant sub-matrices.
 18. The data encoder according to claim 12, wherein the code comprises multiple component codes, wherein the parity sub-matrix H_(p) comprises one or more block-circulant matrices, each comprising multiple blocks that belong to respective component parity-check matrices of the component codes.
 19. The data encoder according to claim 19, wherein the parity sub-matrix H_(p) comprises interleaved block-columns of the block-circulant matrices.
 20. A computer software product, the product comprising a tangible non-transitory computer-readable medium in which program instructions are stored, which instructions, when read by a processor of a data encoder, cause the processor to receive, via an interface of the data encoder, a data vector to be encoded into a code word in accordance with a code defined by a parity-check matrix H, and, to produce an intermediate vector s by multiplying the data vector by a data sub-matrix H_(s) of the parity-check matrix H, and to derive a parity part of the code word by applying a sequence of operations to the vector s based on a decomposition of a parity sub-matrix H_(p) of the matrix H using matrices A, C, U and V, wherein A is a block triangular matrix that has the same size as H_(p), C is matrix that is smaller than H_(p), and the matrices U and V are placement matrices that are selected so that A, C, U and V satisfy a matrix equation H_(p)=A+UCV. 